//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.zy.gpdemo.print;

public class PrintHandle {
    public static String printSuccess = "ok";
    private static PrintHandle single = null;

    public PrintHandle() {
    }

    private static PrintHandle getInstance() {
        if (single == null) {
            single = new PrintHandle();
        }

        return single;
    }

    public static String printHandle(String params, String appRoot, String printServiceName, String reportName, String reportParams, Integer printNums) {
        PrintHandle print = getInstance();
        return print.print(params, appRoot, printServiceName, reportName, reportParams, printNums);
    }

    private String print(String params, String appRoot, String printServiceName, String reportName, String reportParams, Integer printNums) {
        String mesg = printSuccess;

        try {
            QuieeDirectPrintJobJava a = new QuieeDirectPrintJobJava(appRoot, reportName, reportParams + "=" + params, printServiceName);
            a.print();
        } catch (Exception e) {
            mesg = e.getMessage();
        }

        return mesg;
    }
}
